home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Camelot
/
Camelot 013 (1988-04)(Swedish User Group of Amiga)(SE)(PD)[WB].zip
/
Camelot 013 (1988-04)(Swedish User Group of Amiga)(SE)(PD)[WB].adf
/
Modula-2
/
Benchmark
/
Defs
/
ArpMisc.def
< prev
next >
Wrap
Text File
|
1988-04-14
|
4KB
|
104 lines
DEFINITION MODULE ArpMisc;
(*==========================================================================*)
(* *)
(* ARP library bindings *)
(* *)
(*==========================================================================*)
(* Written for Modula-2 Software Construction Set *)
(*==========================================================================*)
(* *)
(* Original Author : Martin Taillefer. 26-Feb-88 *)
(* *)
(* Version : 1.00a 26-Feb-88 Martin Taillefer *)
(* Original. *)
(* *)
(*==========================================================================*)
FROM SYSTEM IMPORT ADDRESS, BYTE;
FROM Intuition IMPORT Window, WindowPtr;
FROM AmigaDOS IMPORT FileInfoBlock;
FROM ArpProcessHandler IMPORT BreakSigSet;
CONST
FChars = 32; (* Filename size *)
DSize = 33; (* Directory name size *)
FRFirstGadget = 7680H; (* User gadgetID's must be less than this *)
TYPE
FRFunction = PROCEDURE(LONGCARD,ADDRESS):LONGCARD;
(* Note: ARP lib passes a LONG value on the stack even though that value only
* represents a FRFlagSet which is a BYTE. So before using, type-cast
* the value to FRFlagSet
*)
FRFlags = (ListFunc, (* Not implemented. *)
GEventFunc, (* Function to call if one of your gads is selected *)
AddGadFunc, (* You get to add gadgets *)
NewWindFunc, (* You got to modify the NewWindow struct. *)
NewIDCMP, (* Force a new IDCMP (only if frWindow # NULL) *)
DoColor, (* Set this bit for that new and differnt look *)
DoMsgFunc, (* You get all IDCMP message not for FileRequest() *)
DoWildFunc); (* Call me with a FIB and a name, ZERO return accepts. *)
FRFlagSet = SET OF FRFlags;
FileRequesterPtr = POINTER TO FileRequester;
FileRequester = RECORD
frHail : ADDRESS; (* Hailing text *)
frFile : ADDRESS; (* Filename array (FCHARS+1) *)
frDir : ADDRESS; (* Directory array (DSIZE+1) *)
frWindow : WindowPtr; (* Window requesting or NULL *)
frFuncFlags: FRFlagSet; (* Control. See above. *)
frReserved1: BYTE; (* Set this to 0 *)
frFunction : FRFunction;(* Func to call for wildcards *)
frReserved2: LONGCARD; (* Set this to 0 *)
END;
PROCEDURE CloseWindowSafely(VAR window,morewindows:Window);
(* Close a window without GURUing.
*
* window : A pointer to the window to close.
* morewindows : If there is another window sharing the IDCMP port of the
* first window, this parameter should be non-NULL. If the
* parameter is NULL, then the IDCMP port will be deallocated.
*)
PROCEDURE FileRequest(VAR fr:FileRequester):ADDRESS;
(* Get filename from user.
*
* fr: An initialized Filerequester record.
*
* returns: A pointer to the resulting filename string.
*)
PROCEDURE Strcmp(s1,s2:ARRAY OF CHAR):INTEGER;
(* Compare two strings, ignoring case.
*
* s1: The first string to compare.
* s2: The second string to compare.
*
* returns: <0, =0 or >0
*)
PROCEDURE Strncmp(s1,s2:ARRAY OF CHAR;n:CARDINAL):INTEGER;
(* Compare two strings for n bytes, ignoring case.
*
* s1: The first string to compare.
* s2: The second string to compare.
* n : The number of characters to compare.
*
* returns: <0, =0 or >0
*)
END ArpMisc.